package com.gamerole.app.repository

import com.aisier.network.base.BaseRepository
import com.aisier.network.entity.ApiResponse
import com.gamerole.app.entity.ArticleBean
import com.gamerole.app.page.source.ArticlePagingSource
import com.gamerole.app.service.HttpService
import com.gamerole.commom.entity.PageBean
import javax.inject.Inject

class ChatRepository @Inject constructor(private var httpService: HttpService) : BaseRepository() {
    suspend fun fetchWxArticleFromNet(page: Int,type:Int): ApiResponse<PageBean<ArticleBean>> {
        return executeHttp {
            httpService.getWxArticle(page = page,season_type=type)
        }
    }
    fun getArticlePagingSource(type: Int):ArticlePagingSource{
        return ArticlePagingSource(httpService,type)
    }

}